import 'package:flutter/material.dart';
import 'package:hao_ke/utils/dio_http.dart';
import 'package:hao_ke/pages/utils/scoped_model_helper.dart';
import '../pages/auth/auth.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';

class MyButtonWidget extends StatelessWidget {

  final String title;

  final Function()? onPressed;

  const MyButtonWidget({super.key, required this.title, this.onPressed});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 110,
      child: FilledButton(
        onPressed: onPressed,
        style: ButtonStyle(
            textStyle: MaterialStateProperty.all(
                const TextStyle(
                    color: Colors.blue,
                    fontSize: 16,
                    fontWeight: FontWeight.bold
                )
            ),
            backgroundColor: MaterialStateProperty.all(const Color.fromRGBO(100, 10, 255, 0.6)),
            shape: MaterialStateProperty.all(
                RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(10),
                )
            )
        ),
        child: Text(title),
      ),
    );
  }
}

